var mongoose=require('mongoose');
// mongoose.Promise = Promise;
//创建数据库连接
var db=mongoose.createConnection('mongodb://localhost:27017/react');

// //监听open事件
// db.once('open',function(callback){
// 	console.log("数据库连接成功")
// })
var userSchema = new mongoose.Schema({
    'username':String,
    'password':String
})

module.exports = db.model('User', userSchema)

